import { defineStore } from 'pinia'

export const useSystemStore = defineStore('system-information', {
  state: () => ({
    platform: '',
    arch: '',
    versions: {
      electron: '',
      chrome: '',
      node: ''
    },
    gPosition: [0, 0],
    fileStorage: {
      audioFile: '', // 音频文件路径
      videoFile: '' // 视频文件路径
    }
  }),

  actions: {
    editstore(data: any) {
      //根据传入的data更新store中的数据
      Object.assign(this, data)
    }
  },

  persist: true // 持久化
})
